<div id="newtaskbox<?php echo $task_list_id ?>" class="gray-box">
	<form id="taskForm<?php echo $form->getObject()->isNew() ? '' : $form->getObject()->getId() ?>" 
		action="<?php echo url_for('tasks/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" 
		method="POST" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?> >
		<label>Choose a Task List:</label>
		<?php echo $form['task_list_id']->render() ?>
		<span id="lecture_number">
			<div class="hrule">
				<hr/>
			</div>
			<label>Assign a Lecture Number:</label>
			<?php echo $form['lecture_number']->render(array('class' => 'input-text', 'style' => 'width: 30px;')) ?>
		</span>
		<div class="hrule">
			<hr/>
		</div>
		<label>Name this Task:</label>
		<?php echo $form['name']->render(array('class' => 'input-text'))?>
		<div class="hrule">
			<hr/>
		</div>
		<label>Description (Optional):</label><br/>
		<?php echo $form['description']->render() ?>
		<div class="hrule">
			<hr/>
		</div>
		<label>URL (Optional):</label>
		<?php echo $form['url']->render(array('class' => 'input-text'))?>
		<div class="hrule">
			<hr/>
		</div>
		<label>URL Title (Optional):</label>
		<?php echo $form['url_title']->render(array('class' => 'input-text'))?>
		<div class="hrule">
			<hr/>
		</div>
		<label>Due Date:</label>
		<?php echo $form['due_date']->render() ?>
		<div class="hrule">
			<hr/>
		</div>
		<label class="floated">Optionally assign this task to:</label>
		<div class="assignments">
			<p class="add-person">
				<?php echo $form['user_id']->render() ?>
			</p>
		</div>
		<div class="hrule white">
			<hr/>
		</div>
		<ul class="options">
			<li style="padding-left: 10px; padding-top: 10px;">
				<input type="submit" value="Save Task" />
			</li>
			<li>
				<?php if($form->getObject()->isNew()):?>
					<a href="javascript:void(0);" class="cancel-form" onclick="cancelAddTask(<?php echo $task_list_id ?>)">Cancel</a>
				<?php else:?>
					<a href="javascript:void(0);" class="cancel-form" onclick="cancelEditTask(<?php echo $form->getObject()->getId() ?>)">Cancel</a>
				<?php endif?>
			</li>
		</ul>
		<?php echo $form->renderHiddenFields() ?>
		<input type="hidden" name="isAjax" value="<?php echo $sf_request->getParameter('isAjax') ?>" />
		<input type="hidden" name="group_id" value="<?php echo $group->getId() ?>" />
	</form>
</div>
